<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"  prefix="fmt"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <c:url var="url" value="static/css/globe.css"/>
	<link rel="stylesheet" type="text/css" href="${url}"> 
	<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
    <title>文献检索平台</title>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<style type="text/css">
	<!--
        div{
            padding:8px 0px;
            font-size:12px;
            text-align:center;
            border:1px solid #888;
        }
        #Queryresult{ overflow:scroll;max-height: 100px;}
       
       
       --> 
    </style>
    <script src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>
	
	<Script Language="JavaScript"> 
     
    function dosearch() {
       if ($("#value").val() == "") {
                 $("#errortip").html("<font color='#FF0000'>请输入查询内容</font>");
             return false;
         }
         $('#searchform').submit();
     }
    /* 弹出摘要 */
    function ShowSammary(summary){
    	
    }
    
       

  

</Script>

  </head>
  
  <body bgcolor="#D4BFFF">
  <div id="Main" style="position:absolute;z-index:0;">
   <div id="header">

		<img class="logo" src="#" />

	</div>
<form id="searchform" name="searchform" method="post"
			action="${pageContext.request.contextPath }/sousuo/find.action">
			
			<select name="condition" >
				<option <c:if test="${query.condition=='title' }">selected</c:if>  value="title">标题</option>
				<option <c:if test="${query.condition=='author' }">selected</c:if> value="author">作者</option>
				<option <c:if test="${query.condition=='pu' }">selected</c:if> value="pu">出版单位</option>
				<option <c:if test="${query.condition=='kw' }">selected</c:if> value="kw">关键词</option>
				<option <c:if test="${query.condition=='summary' }">selected</c:if> value="summary">摘要</option>
				<option <c:if test="${query.condition=='fund' }">selected</c:if> value="fund">基金</option>
				<option <c:if test="${query.condition=='Sub_Number' }">selected</c:if> value="Sub_Number">所属期数</option>
				<option <c:if test="${query.condition=='Doc_Volume' }">selected</c:if> value="Doc_Volume">所属卷数</option>
				<option <c:if test="${query.condition=='content' }">selected</c:if> value="content">全文</option>	
			</select> <i class="icon-more"></i> 
			<input type="text" name="value" value="${query.value}"></input> 
			<input
				type="submit" name="submit" value="查找" onclick="dosearch();" />
				<a href="${pageContext.request.contextPath }/sousuo/AdvancedFind.action">高级检索</a>	<!-- 跳转至高级检索页 -->
              </form>	  
<table width="100%" border=0  id="Queryresult" class="table table-striped table-hover">
<tr>
	<td>标题</td>
	<td>作者</td>
    <td>出版单位</td>
    <td>预览</td>
</tr>
<c:forEach items="${queryDocs}" var="item">
<tr>
	<td>${item.title }</td>
	<td><c:forEach items="${item.authors}" var="author">
      ${author.autName}
        </c:forEach></td>
      <td>${item.publish}</td> 
	<td class="display" >
	<a href="#" class="${item.title}" title="${item.summary}">查看</a></td>
	
	
</tr>
</c:forEach>
</table>
	
</div>		

<!-- 显示摘要的框 -->
<div  id="displayMYSummary">
   <span class="glyphicon glyphicon-remove"></span>
</div>
<script type="text/javascript">

    $(".display a").each( function() {$(this) .click( function() {
                                            var linkUrl = $(this).attr("class");
                                            var linkCntType = $(this) .attr("title");
                                            //var windowStatus = "dialogWidth:1000px;dialogHeight:700px;center:1;status:0;";
                                            alert(document.write("<h1>"+linkUrl+"</h1><br><br>"+linkCntType));
                                              //showModalDialog(url,"<h1>"+linkUrl+"</h1><br><br>"+linkCntType,windowStatus);

                                        });

                    });

</script>
	
  </body>
</html>
